﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using VIA.SiMoJi.Presentation.ViewModel;

namespace VIA.SiMoJi.Presentation.View
{
    /// <summary>
    /// NozzleDebugView.xaml 的交互逻辑
    /// </summary>
    public partial class NozzleDebugView : UserControl
    {
        public NozzleDebugView()
        {
            InitializeComponent();
        }

        public NozzleDebugViewModel NozzleDebugViewModel
        {
            get { return (NozzleDebugViewModel)GetValue(NozzleDebugViewModelProperty); }
            set { SetValue(NozzleDebugViewModelProperty, value); }
        }

        // Using a DependencyProperty as the backing store for NozzleDebugViewModel.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty NozzleDebugViewModelProperty =
            DependencyProperty.Register("NozzleDebugViewModel", typeof(NozzleDebugViewModel), typeof(NozzleDebugView), new PropertyMetadata(new NozzleDebugViewModel(null)));



        private void Bt_Suck_Click(object sender, RoutedEventArgs e)
        {
            NozzleDebugViewModel?.Suck();
        }

        private void Bt_Broke_Click(object sender, RoutedEventArgs e)
        {
            NozzleDebugViewModel?.Broke();
        }
    }
}
